﻿<Window x:Class="WGMClient.MainClientWindow"
    xmlns:localcontrols="clr-namespace:WGMClient.Controls"
    xmlns:localviews="clr-namespace:WGMClient.Views"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WGM Beta3" Height="400" Width="800" WindowStyle="None" SizeChanged="OnSizeChanged" AllowsTransparency="True" ResizeMode="CanResizeWithGrip"  Background="Transparent"  Closing="OnClosing" Loaded="OnLoaded" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="25" x:Name="_titleBarRow"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <Border Background="#EA66666C" Name="_titleBorder" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="7,7,0,0" MouseLeftButtonDown="OnTitleBarMouseDown"  >
            <Grid>
                <localcontrols:BackgroundTextBlock x:Name="_titleTB" MaxWidth="220" Text="WGM Beta3"  Height="25" VerticalAlignment="Center" LabelForeground="Black" LabelFontFamily="Verdana" LabelFontWeight="Bold" BorderBackground="#F266666C" BorderRadius="7,25,0,0" HorizontalAlignment="Left" ImageOnLeft="True" BackgroundImage="Images\wgmLogo.png" HasImage="True" TextMargin="0,5,20,5" ImageWidth="15" ImageHeight="15" ImageMargin="5,0,0,0" ImageStretch="UniformToFill"/>
                <localcontrols:BackgroundTextBlock x:Name="_titleMessageTB" MaxWidth="350" Text=""  Height="25" VerticalAlignment="Center" LabelForeground="WhiteSmoke" LabelFontFamily="Verdana" LabelFontWeight="Bold" BorderBackground="Transparent" BorderRadius="0,0,0,0"  HorizontalAlignment="Center" ImageOnLeft="True" HasImage="False" TextMargin="5" />

                <Border HorizontalAlignment="Right" Width="80" CornerRadius="25,7,0,0" Background="#F266666C" x:Name="_sizeControls" Visibility="Visible">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                        <localcontrols:GlassButton ImageSource="Images/minus.png" Title="Minimize" Width="20" Height="25" TransitionColor="LightBlue" ImageMargin="4,12,4,4" MouseLeftButtonDown="OnMinimize"/>
                        <localcontrols:GlassButton ImageSource="Images/restore.png" Title="Maximize" Width="20" Height="25" TransitionColor="LightBlue" MouseLeftButtonDown="OnMaxRestore" />
                        <localcontrols:GlassButton ImageSource="Images/close.png" Title="Close" Width="20" Height="25" TransitionColor="Red" MouseLeftButtonDown="OnClose" />
                    </StackPanel>
                </Border>
            </Grid>            
        </Border>
        <Grid  Grid.Row="1" x:Name="_mainGrid"  >
            <Grid.Background>
                <RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5" RadiusX="0.5" RadiusY="0.5">
                    <GradientStop Color="#FFEEEEEE" Offset="0" />
                    <GradientStop Color="#FFEDEDED" Offset="0.2" />
                    <GradientStop Color="#FFDDDDDD"  Offset="0.4" />
                    <GradientStop Color="#FFCCCCCC"  Offset="0.6" />
                    <GradientStop Color="#FFBBBBBB"  Offset="0.8" />
                    <GradientStop Color="#FFAAAAAA"  Offset="1" />


                </RadialGradientBrush>
            </Grid.Background>

            <TabControl x:Name="_mainTabControl" BorderThickness="0" Background="Transparent" Focusable="False" >
                <TabItem Visibility="Collapsed" x:Name="_loginTab">
                    <Grid>
                        <localviews:LoginView x:Name="_loginView" HorizontalAlignment="Left"  Margin="-8,-10,0,0"/>
                        <Image x:Name="_wgmBgImg" Source="Images/wgmLogo.png" Stretch="None" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
                    </Grid>                    
                </TabItem>
                <TabItem Visibility="Collapsed" x:Name="_mainTab">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="55"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <StackPanel VerticalAlignment="Bottom" Margin="20,0,0,0" Orientation="Horizontal">
                            <localcontrols:BackgroundTextBlock Text="conversations" HasImage="False" UnderlineVisible="True"  VerticalAlignment="Bottom" LabelForeground="Black" LabelFontFamily="Verdana"  BorderBackground="Transparent"   HorizontalAlignment="Left" LabelFontSize="14" Margin="0,0,0,0" TextMargin="3,0,3,0" InnerBorderMargin="0,0,0,3" x:Name="_conversationSelector" Cursor="Hand" MouseLeftButtonDown="OnConversationSelected"/>
                            <localcontrols:BackgroundTextBlock Text="profile" HasImage="False" UnderlineVisible="False"  VerticalAlignment="Bottom" LabelForeground="Black" LabelFontFamily="Verdana"  BorderBackground="Transparent"   HorizontalAlignment="Left" LabelFontSize="14" Margin="50,0,0,0" TextMargin="3,0,3,0" InnerBorderMargin="0,0,0,3" x:Name="_profileSelector" Cursor="Hand" MouseLeftButtonDown="OnProfileSelected"/>
                            <localcontrols:BackgroundTextBlock Text="history" HasImage="False" UnderlineVisible="False"  VerticalAlignment="Bottom" LabelForeground="Black" LabelFontFamily="Verdana"  BorderBackground="Transparent"   HorizontalAlignment="Left" LabelFontSize="14" Margin="50,0,0,0" TextMargin="3,0,3,0" InnerBorderMargin="0,0,0,3" x:Name="_historySelector" Cursor="Hand" MouseLeftButtonDown="OnHistorySelected"/>
                            <localcontrols:BackgroundTextBlock Text="settings" HasImage="False" UnderlineVisible="False"  VerticalAlignment="Bottom" LabelForeground="Black" LabelFontFamily="Verdana"  BorderBackground="Transparent"   HorizontalAlignment="Left" LabelFontSize="14" Margin="50,0,0,0" TextMargin="3,0,3,0" InnerBorderMargin="0,0,0,3" x:Name="_settingsSelector" Cursor="Hand" MouseLeftButtonDown="OnSettingsSelected"/>

                        </StackPanel>
                        <localcontrols:BackgroundTextBlock LabelAlignment="Right" ImageMargin="5,0,5,0" SubLabelAlignment="Right" Text="Getting info..." BackgroundImage="Images\blank.png" SubText="waiting..." GlowImage="True" ImageGlowColor="LightGray" ImageHeight="35" ImageWidth="35" ImageGlowRadius="2" SubLabelForeground="#FF222222" SubLabelFontStyle="Italic" HasImage="True" UnderlineVisible="False"  VerticalAlignment="Top" HorizontalAlignment="Right" LabelForeground="Black" LabelFontFamily="Verdana"  BorderBackground="Transparent"  LabelFontSize="14" Margin="0,0,0,0" TextMargin="3,0,3,0" InnerBorderMargin="0,0,0,3" x:Name="_myInfo"  />

                        <TabControl Grid.Row="1" x:Name="_innerTabControl" BorderThickness="0" Background="Transparent" Focusable="False" SelectionChanged="OnInnerTabSelectionChanged" Margin="0,20,0,0">
                            <TabItem Visibility="Collapsed" x:Name="_conversationsTab">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="2"/>
                                        <ColumnDefinition/>                                        
                                    </Grid.ColumnDefinitions>
                                    <ScrollViewer x:Name="_contactListScroller" Margin="22,0,0,25" Background="Transparent" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
                                        <StackPanel x:Name="_contactListPanel"/>
                                    </ScrollViewer>
                                    <GridSplitter Grid.Column="1" VerticalAlignment="Stretch" ResizeBehavior="PreviousAndNext" Width="2" Background="Transparent"/>
                                    <TabControl Grid.Column="2" x:Name="_chatTabControl" BorderThickness="0" Background="Transparent" Focusable="False" SelectionChanged="OnChatSelectionChanged"/>
                                </Grid>
                            </TabItem>
                            <TabItem Visibility="Collapsed" x:Name="_profileTab">
                                <localviews:ProfileView x:Name="_profileView"/>
                            </TabItem>
                            <TabItem Visibility="Collapsed" x:Name="_historyTab">

                            </TabItem>
                            <TabItem Visibility="Collapsed" x:Name="_settingsTab">
                                <localviews:SettingsView x:Name="_settingsView"/>
                            </TabItem>
                        </TabControl>

                       
                    </Grid>
                </TabItem>
            </TabControl>
        </Grid>
    </Grid>
</Window>
